package org.example.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.example.entity.Permissions;
import org.example.mapper.PermissionsMapper;
import org.example.service.PermissionsService;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class PermissionsServiceImpl extends ServiceImpl<PermissionsMapper, Permissions> implements PermissionsService{
   public List<Permissions> getPermissionTree(Integer parentId,Integer userId){
        return baseMapper.getPermissionTree(parentId,userId);
    }

    public List<Permissions> selectByRolesAndUserId(Integer userId){
       return baseMapper.selectByRolesAndUserId(userId);
    }

    public List<Permissions> getPermissions(Integer userId){
        return baseMapper.getPermissions(userId);
    }

}
